

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show Artifact</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">Artifact List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Artifact</g:link></span>
        </div>
        <div class="body">
            <h1>Show Artifact</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>

                    
                        <tr class="prop">
                            <td valign="top" class="name">Id:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:artifactInstance, field:'id')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Description:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:artifactInstance, field:'description')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Name:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:artifactInstance, field:'name')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Reporter:</td>
                            
                            <td valign="top" class="value"><g:link controller="user" action="show" id="${artifactInstance?.reporter?.id}">${artifactInstance?.reporter?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Tracker:</td>
                            
                            <td valign="top" class="value"><g:link controller="tracker" action="show" id="${artifactInstance?.tracker?.id}">${artifactInstance?.tracker?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            
            <div class="list">
            <h2>Comments</h2>
                <table>
                    <tbody>
                    <g:each in="${commentInstanceList}" status="i" var="commentInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        	<td>
                        		<table>
                        		
                        		<tr><td>${fieldValue(bean:commentInstance, field:'creator')}</td></tr>
                        	
                            	<tr><td>${fieldValue(bean:commentInstance, field:'body')}</td></tr>
                        
                            	<tr><td><g:formatDate format="yyyy-MM-dd hh:mm aaa" date="${commentInstance.creationDate}"/></td></tr>
                        		
                            	</table>
                        	</td>
                        </tr>
                    </g:each>
	                    <tr>
	                    	<td>
	                    		<g:link controller="comment" action="create" params="[artfId:artifactInstance.id]">Create comment</g:link>
	                    	</td>
	                    </tr>
                    </tbody>
                </table>
            </div>
            
            <div class="buttons">
                <g:form>
                    <input type="hidden" name="id" value="${artifactInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
